<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<h:head>
		<title>Crea Volo</title>
	</h:head>
	<h:body>
		<h:form>
			<h:panelGrid columns="3" id="createvolo">
			    
			    <h:outputLabel for="dataInizio" value="Data Inizio: *" />  
			    <p:calendar id="dataInizio" value="#{createBasicProductBean.newPbDto.dataInizio}" required="true" pattern="dd/MM/yyyy" mindate="#{createBasicProductBean.today}">  
			  	<p:ajax event="dateSelect" update="createvolo" />
			  	</p:calendar>
			  	<p/>
			  
			    <h:outputLabel for="dataFine" value="Data Fine: *" />  
			    <p:calendar id="dataFine" value="#{createBasicProductBean.newPbDto.dataFine}" required="true" pattern="dd/MM/yyyy" mindate="#{createBasicProductBean.newPbDto.dataInizio}"/>
			    <p/>
			    
			    <h:outputLabel for="prezzo">Prezzo: *</h:outputLabel>
			  	<p:inputText id="prezzo" value="#{createBasicProductBean.newPbDto.prezzo}" />  
			  	<p:message for="prezzo" />
			  	
			  	<h:outputLabel for="posti">Posti: *</h:outputLabel>
			  	<p:inputText id="posti" value="#{createBasicProductBean.newPbDto.nposti}" />
			  	<p:message for="posti" />
			  	
			  	<h:outputLabel for="cittaArrivo">Città di arrivo: *</h:outputLabel>
			  	<p:inputText id="cittaArrivo" value="#{createBasicProductBean.newVoloDTO.citta_arrivo}" />  
			  	<p:message for="cittaArrivo" />
			  	
			  	<h:outputLabel for="cittaPartenza">Città di partenza: *</h:outputLabel>
			  	<p:inputText id="cittaPartenza" value="#{createBasicProductBean.newVoloDTO.citta_partenza}" />  
			  	<p:message for="cittaPartenza" />
			  	
			    <h:outputLabel for="aereo">Modello aereo: *</h:outputLabel>
			  	<p:inputText id="aereo" value="#{createBasicProductBean.newVoloDTO.aereo}" />
			  	<p:message for="aereo" />
			  	
			  	<h:outputLabel for="compagnia">Compagnia: *</h:outputLabel>
			  	<p:inputText id="compagnia" value="#{createBasicProductBean.newVoloDTO.compagnia}" />
				<p:message for="compagnia" />
				
				<h:commandButton value="Salva" action="#{createBasicProductBean.createProductVolo()}"/>
		  	</h:panelGrid>
  		</h:form>
	</h:body>
</html>